home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / basic / svgaqb21.zip / SVGADEMO.BAS < prev    next >
BASIC Source File  |  1994-05-09  |  24KB  |  714 lines

  1. '****************************************************************************
  2. '*
  3. '*      'SVGAQB' & 'SVGAPV' A Super VGA Graphics Librarys for use with
  4. '*      MS QuickBASIC 4.X and MS PDS/VBDOS
  5. '*      Copyright 1993-1994 by Stephen L. Balkum and Daniel A. Sill
  6. '*
  7. '*      MS, QuickBASIC, PDS, and VBDOS are registered trademarks of
  8. '*      Microsoft Corporation. GIF and 'Graphics Interchange Format' are
  9. '*      trademarks (TM) ofCompuServe, Incorporated, an H&R Block Company.
  10. '*
  11. '*    **************** UNREGISTERED SHAREWARE VERSION **********************
  12. '*    * FOR EVALUATION ONLY. NOT FOR RESALE IN ANY FORM. SOFTWARE WRITTEN  *
  13. '*    * USING THIS UNREGISTERED SHAREWARE GRAPHICS LIBRARY MAY NOT BY SOLD *
  14. '*    * OR USED FOR ANY PURPOSE OTHER THAN THE EVALUATION OF THIS LIBRARY. *
  15. '*    **********************************************************************
  16. '*
  17. '*    **************** NO WARRANTIES AND NO LIABILITY **********************
  18. '*    * Stephen L. Balkum and Daniel A. Sill provide no warranties, either *
  19. '*    * expressed or implied, of merchant ability, or fitness, for a       *
  20. '*    * particular use or purpose of this SOFTWARE and documentation.      *
  21. '*    * In no event shall Stephen L. Balkum or Daniel A. Sill be held      *
  22. '*    * liable for any damages resulting from the use or misuse of the     *
  23. '*    * SOFTWARE and documentation.                                        *
  24. '*    **********************************************************************
  25. '*
  26. '*    ************** U.S. GOVERNMENT RESTRICTED RIGHTS *********************
  27. '*    * Use, duplication, or disclosure of the SOFTWARE and documentation  *
  28. '*    * by the U.S. Government is subject to the restrictions as set forth *
  29. '*    * in subparagraph (c)(1)(ii) of the Rights in Technical Data and     *
  30. '*    * Computer Software clause at DFARS 252.227-7013.                    *
  31. '*    * Contractor/manufacturer is Stephen L. Balkum and Daniel A. Sill,   *
  32. '*    * P.O. Box 7704, Austin, Texas 78713-7704                            *
  33. '*    **********************************************************************
  34. '*
  35. '*    **********************************************************************
  36. '*    * By using this SOFTWARE or documentation, you agree to the above    *
  37. '*    * terms and conditions.                                              *
  38. '*    **********************************************************************
  39. '*
  40. '****************************************************************************
  41.  
  42.  
  43.     REM $INCLUDE: 'SVGABC.BI'
  44.     REM $INCLUDE: 'SVGADEMO.BI'
  45.     CLEAR
  46.  
  47.     REDIM POINTARRY3D(0 TO 13) AS P3Dtype
  48.     REDIM PLAYARRY(0 TO 13) AS P3Dtype
  49.     REDIM PLOTARRY(0 TO 13) AS P2DType
  50.     REDIM OPLOTARRY(0 TO 13) AS P2DType
  51.     REDIM GFXBLK1(0 TO 100) AS INTEGER
  52.     REDIM GFXBLK2(0 TO 100) AS INTEGER
  53.     REDIM GFXBLK3(0 TO 100) AS INTEGER
  54.                                     
  55.     '*************************************************************************
  56.     '* SAVE THE STARTING VIDEOMODE AND SET IT TO MODE 3.
  57.     '*************************************************************************
  58.     STARTVIDEOMODE = VIDEOMODEGET
  59.     DUMMY = RESTEXT
  60.     CLS
  61.     FOR A = 0 TO 33
  62.         DUMMY$ = INKEY$  '* CLEAR THE KEYBOARD BUFFER
  63.     NEXT A
  64.     '*************************************************************************
  65.     '* MOVE THE DOS CURSOR TO THE TOP LEFT TO START THE PROGRAM AND SAY HELLO
  66.     '*************************************************************************
  67.     LOCATE 1, 4
  68.     PRINT "'SVGAQB.LIB' A SuperVGA Graphics Library For Use With MS QuickBasic 4.5"
  69.     LOCATE 2, 4
  70.     PRINT "'SVGAPV.LIB' A SuperVGA Graphics Library For Use With MS PDS and VBDOS"
  71.  
  72.     LOCATE 4, 10
  73.     PRINT "Copyright 1993-1994 by Stephen L. Balkum and Daniel A. Sill"
  74.     LOCATE 12, 25
  75.     PRINT "Demonstration/Example Program"
  76.     LOCATE 23, 1
  77.     PRINT "Press a key to begin the demo..."
  78.     GETKEY (RET$)
  79.     CLS
  80.  
  81.     '*************************************************************************
  82.     '* LET'S ID THE PROCESSOR FIRST AS THE LIBRARY REQUIRES A 386 OR BETTER.
  83.     '*************************************************************************
  84.     'LOCATE 1, 1
  85.     CPU = WHICHCPU
  86.     CPU$ = STR$(CPU)
  87.     L = LEN(CPU$)
  88.     CPU$ = RIGHT$(CPU$, L - 1)
  89.     IF CPU < 386 THEN
  90.         PRINT "Sorry, this library requires a 80386 or better processor."
  91.         PRINT "Processor is identified as a 80"; CPU$; "."
  92.         PRINT "Demo program will be terminated."
  93.         PRINT
  94.         PRINT "Press a key..."
  95.         SOUND 100, 5
  96.         WHILE INKEY$ = ""
  97.         WEND
  98.         VIDEOMODESET (STARTVIDEOMODE)
  99.         CLEAR
  100.         END
  101.     END IF
  102.  
  103.     '*************************************************************************
  104.     '* LET'S ID THE VIDEO CARD/CHIP AS THE LIBRARY REQUIRES A SUPERVGA ADAPTER.
  105.     '*************************************************************************
  106.     VGA = WHICHVGA
  107.     PRINT "Microprocessor is identified as a 80"; CPU$; "."
  108.     PRINT
  109.     SELECT CASE VGA
  110.         CASE IS = 1
  111.             VGA$ = "Acumos AVGA2/3 SuperVGA"
  112.         CASE IS = 2
  113.             VGA$ = "ATI Technologies 18/28/38/68800 SuperVGA"
  114.         CASE IS = 3
  115.             VGA$ = "Ahead V5000 ver A SuperVGA"
  116.         CASE IS = 4
  117.             VGA$ = "Ahead V5000 ver B SuperVGA"
  118.         CASE IS = 5
  119.             VGA$ = "Chips and Technologies 82C450/1/2/3/5/6/7 SuperVGA"
  120.         CASE IS = 6
  121.             VGA$ = "Cirrus Logic CL-GD 5xx,6xx,28xx,54xx,62xx SuperVGA"
  122.         CASE IS = 7
  123.             VGA$ = "Everex Ev236/6xx Micro Enhancer SuperVGA"
  124.         CASE IS = 8
  125.             VGA$ = "Genoa 61/62/63/64/6600 SuperVGA"
  126.         CASE IS = 9
  127.             VGA$ = "NCR 77C21/22/22E/22E+ SuperVGA"
  128.         CASE IS = 10
  129.             VGA$ = "Oak Technologies OTI-037C/067/077/087 SuperVGA"
  130.         CASE IS = 11
  131.             VGA$ = "Paradise/Western Digital PVGA1A,WD90C00/1x/2x/3x SuperVGA"
  132.         CASE IS = 12
  133.             VGA$ = "Realtek RT3106 SuperVGA"
  134.         CASE IS = 13
  135.             VGA$ = "Trident 8800CS,8900B/C/CL/CX,90x0 SuperVGA"
  136.         CASE IS = 14
  137.             VGA$ = "Tseng Labs ET3000-AX/BX/BP SuperVGA"
  138.         CASE IS = 15
  139.             VGA$ = "Tseng Labs ET4000/W32/W32I SuperVGA"
  140.         CASE IS = 16
  141.             VGA$ = "VESA compatible SuperVGA"
  142.         CASE IS = 17
  143.             VGA$ = "Video 7 HT-208/16 SuperVGA"
  144.         CASE IS = 18
  145.             VGA$ = "Avance Logic AL2101 SuperVGA"
  146.         CASE IS = 19
  147.             VGA$ = "MXIC MX68000/10 SuperVGA"
  148.         CASE IS = 20
  149.             VGA$ = "Primus P2000 SuperVGA"
  150.         CASE ELSE
  151.             VGA$ = "Unknown"
  152.             VGA = 0
  153.     END SELECT
  154.     IF VGA < 1 THEN
  155.         PRINT "Sorry, unable to identify video card or it is not a SuperVGA video adapter."
  156.         PRINT "Demo program will be terminated."
  157.         PRINT
  158.         PRINT "Press a key..."
  159.         SOUND 100, 5
  160.         WHILE INKEY$ = ""
  161.         WEND
  162.         VIDEOMODESET (STARTVIDEOMODE)
  163.         CLEAR
  164.         END
  165.     ELSE
  166.         PRINT "Video card/chip is identified as a "; VGA$; "."
  167.     END IF
  168.  
  169.     '*************************************************************************
  170.     '* LET'S SEE THE HOW MUCH MEMORY IS INSTALLED ON THE SUPER VGA ADAPTER.
  171.     '*************************************************************************
  172.     VIDEOMEMORY = WHICHMEM
  173.     MEM$ = STR$(VIDEOMEMORY)
  174.     MEM$ = RIGHT$(MEM$, LEN(MEM$) - 1) + " kB"
  175.     IF VIDEOMEMORY < 1 THEN
  176.         PRINT "Sorry, unable to identify the amount of installed video memory."
  177.         PRINT "Demo program will be terminated."
  178.         PRINT
  179.         PRINT "Press a key..."
  180.         SOUND 100, 5
  181.         WHILE INKEY$ = ""
  182.         WEND
  183.         VIDEOMODESET (STARTVIDEOMODE)
  184.         CLEAR
  185.         END
  186.     ELSE
  187.         PRINT "Installed video memory identified as "; MEM$; "."
  188.     END IF
  189.  
  190.     '*************************************************************************
  191.     '* LET'S TELL THE USER WHAT THE HIGHEST RESOLUTION THAT THE VIDEO CARD
  192.     '* AND ITS INSTALLED MEMORY CARD IS CAPABLE OF. THE MONITOR MUST BE ABLE
  193.     '* TO SUPPORT THOSE MODES TOO !
  194.     '*************************************************************************
  195.     PRINT "Video card and installed memory is capable of the following resolutions:"
  196.     SELECT CASE VIDEOMEMORY
  197.         CASE IS > 2047
  198.             PRINT TAB(4); "320x200 in 256 colors"
  199.             PRINT TAB(4); "640x400 in 256 colors"
  200.             PRINT TAB(4); "640x480 in 256 colors"
  201.             PRINT TAB(4); "800x600 in 256 colors"
  202.             PRINT TAB(4); "1024x768 in 256 colors"
  203.             PRINT TAB(4); "1280x1024 in 256 colors"
  204.             MAX = 5
  205.         CASE IS > 1023
  206.             PRINT TAB(4); "320x200 in 256 colors"
  207.             PRINT TAB(4); "640x400 in 256 colors"
  208.             PRINT TAB(4); "640x480 in 256 colors"
  209.             PRINT TAB(4); "800x600 in 256 colors"
  210.             PRINT TAB(4); "1024x768 in 256 colors"
  211.             MAX = 4
  212.         CAS